"use strict";

const Controller = require("egg").Controller;

class HomeController extends Controller {
    async housdel() {
        const { ctx, app } = this;
        const { id } = ctx.request.body
        await app.mysql.delete('addtolist', { id })
        const data = await app.mysql.select('addtolist')
        ctx.body = {
            code: 1,
            msg: "删除成功",
            data
        };
        console.log("删除的data", data)
    }
}

module.exports = HomeController;

//    realction = "", realintroduction